package cn.iocoder.yudao.module.blog.dal.mysql.jiutagclassity;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.blog.dal.dataobject.jiutagclassity.BlogJiuTagClassityDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.blog.controller.admin.jiutagclassity.vo.*;

/**
 * 案例标签分类 Mapper
 *
 * @author 曹建伟
 */
@Mapper
public interface BlogJiuTagClassityMapper extends BaseMapperX<BlogJiuTagClassityDO> {

    default PageResult<BlogJiuTagClassityDO> selectPage(BlogJiuTagClassityPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<BlogJiuTagClassityDO>()
                .likeIfPresent(BlogJiuTagClassityDO::getName, reqVO.getName())
                .betweenIfPresent(BlogJiuTagClassityDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(BlogJiuTagClassityDO::getId));
    }

    default List<BlogJiuTagClassityDO> selectList(BlogJiuTagClassityExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<BlogJiuTagClassityDO>()
                .likeIfPresent(BlogJiuTagClassityDO::getName, reqVO.getName())
                .betweenIfPresent(BlogJiuTagClassityDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(BlogJiuTagClassityDO::getId));
    }

}
